package com.boxin.ims.modules.wechat.busi;

import org.springframework.stereotype.Service;

import com.boxin.ims.modules.wechat.entity.WechatMember;
import com.boxin.ims.modules.wechat.utils.WechatUtils;

/**
 * @author Jakemanse
 * @date 2013-10-23
 * @function <p> 查询积分</p>
 */
@Service
public class ScoreQueryProcessor  extends BusinessProcessor{

	public ScoreQueryProcessor() {
		super();
	}
	
	
	@Override
	public ProcessMessage process() {
		WechatMember member =	memberCheckAndReply();
		if(member != null){
			String reply  = "";
			Integer score = member.getScore();
			score = (score==null) ? 1 :score ;
			wechatMemberService.save(member);
			reply = WechatUtils.processUserBusinessReply(user.getId(), "积分", score);
			if(com.thinkgem.jeesite.common.utils.StringUtils.isEmpty(reply)){
				reply = "您当前的积分为:"+score+"分!";
			}
			
			
			//回复信息
			writeToUser(reply);
		}
		return null;
		
	}

	@Override
	public boolean isNeedBeMember() {
		// TODO Auto-generated method stub
		return false;
	}
	
	
}
